package net.imwork.amorgemini.core.exception;

import net.imwork.amorgemini.core.dict.ExceptionDict;

/**
 * Created by lvbr on 2017-09-01 19:50.
 */
public class BaseException extends RuntimeException{
    private Integer code;
    private String message;

    public BaseException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public BaseException(ExceptionDict e) {
        super(e.getMsg());
        this.code = e.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
